A nonvolatile semiconductor memory, such as a flash memory, is constituted of memory cells each having a transistor including a floating gate or a trap gate. A state having no charges injected into the floating gate or the trap gate is an erase state (data ‘1’), and a state having charges injected into them is a program state (data ‘0’). A threshold voltage of the cell transistor becomes low in the erase state, while a threshold voltage becomes high in the program state. A write operation (or program operation) which injects charges into the floating gate, etc. changes data ‘1’ to data ‘0’. An erase operation which removes or neutralizes the charges changes data ‘0’ to data ‘1’.
FIG. 1 shows a configuration diagram of a conventional nonvolatile memory. This memory device 100 includes memory cell array 10, row decoder 12, column decoder 14, and data input/output circuit 16. Memory cell array 10 is constituted of a plurality of blocks each having a plurality of memory cells. In such a nonvolatile memory, the write operation writes a write data into a designated address. The erase operation simultaneously places the memory into the erase state on a block-by-block basis.
FIG. 2 is a flowchart of the write operation performed in the conventional nonvolatile memory. First, an address ADD and a write data DA are input from outside together with a write command (step S1). Decoders 12, 16 select a non-illustrated word line and a bit line corresponding to address ADD. The write data is written into the memory cell at the intersection of the selected word line and the selected bit line (S6). When consistency between the data having been written into the memory and the write data is, verified after the write operation (S2), the write operation is successfully completed (S3). On the hand, when the above-mentioned consistency cannot be verified, the write operation S6 is repeated until the number of write operation reaches a predetermined times (S4). When the number of write operation exceeds a predetermined number, the operation is abnormally terminated as an abnormal write operation (S5).
In the flash memory, as mentioned earlier, the write operation is performed in such a way that a data is written into a memory cell(s) corresponding to a designated address. Namely, a data is written into a memory cell on a bit-by-bit basis selected by the address, or memory cells on a basis of a memory cell group consisting of one byte, one word, or the like which is selected by the address. Or, in some cases, the data is written into a memory cell group specified on a word line basis selected by the address. Such a write operation is performed by changing the memory cell in the erase state (data ‘1’) to data ‘0’. In contrast, the erase operation is performed on a block (or sector) basis, which contains multiple units of memory cells in the write operation, or on a chip-by-chip basis. Typically, in the erase operation, the entire memory cells included in an object block of the erase operation are once changed into the program state (data ‘0’), and thereafter these memory cells are simultaneously placed into the erase state (data ‘1’). This method is also applied when erasing on a chip-by-chip basis.
In a flash memory, a program or a predetermined data are written. When modification of only a part of the program or the data once written to the flash memory is desired, it is necessary to erase the memory block of interest once, and rewrite the whole program or data which is partially modified. In other words, because there is no other way than erasing on a block basis, the entire data in the block must once be erased and thereafter the data must be rewritten including the part which is intrinsically unnecessary to modify. This must be applied even when an extremely small portion of data in the block is to modify.
Thus, when a request for partial rewrite occurs in the conventional nonvolatile memory, it is necessary to erase the memory block in which the data to be modified is recorded, and rewrite a new data a part of which has been prepared for modification. As a result, rewrite processing in the conventional nonvolatile memory becomes complicated, requires substantially long time for rewriting, and yields the erace times being increased. Such operations of erasing and rewriting the whole data which is required even when modifying an extremely small data portion produces users' inconvenience.